package com.hongyan.bean;

import java.sql.Timestamp;
import java.util.Arrays;
import java.util.Objects;

public class Document {
    private String d_id;
    private String d_name;
    private Timestamp upload_time;
    private byte[] document_upload;


    @Override
    public String toString() {
        return "Document{" +
                "d_id='" + d_id + '\'' +
                ", d_name='" + d_name + '\'' +
                ", upload_time=" + upload_time +
                ", document_upload=" + (document_upload) +
                '}';
    }

    public Object[] toArray() {
        return new Object[]{d_id, d_name, upload_time, document_upload};
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Document document = (Document) o;
        return Objects.equals(d_id, document.d_id) && Objects.equals(d_name, document.d_name) && Objects.equals(upload_time, document.upload_time) && Objects.equals(document_upload, document.document_upload);
    }

    @Override
    public int hashCode() {
        return Objects.hash(d_id, d_name, upload_time, Arrays.hashCode(document_upload));
    }

    public String getD_id() {
        return d_id;
    }

    public void setD_id(String d_id) {
        this.d_id = d_id;
    }

    public String getD_name() {
        return d_name;
    }

    public void setD_name(String d_name) {
        this.d_name = d_name;
    }

    public Timestamp getUpload_time() {
        return upload_time;
    }

    public void setUpload_time(Timestamp upload_time) {
        this.upload_time = upload_time;
    }

    public byte[] getDocument_upload() {
        return document_upload;
    }

    public void setDocument_upload(byte[] document_upload) {
        this.document_upload = document_upload;
    }
// 构造函数、getter和setter方法
}
